package com.zmn.plat.persistence.interfaces.supplier;

import com.zmn.common.dto.StatusDTO;
import com.zmn.plat.model.entity.supplier.ScmSupplier;
import com.zmn.plat.model.entity.supplier.ScmSupplierQuery;
import com.zmn.plat.model.entity.supplier.ScmSupplierVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 类说明：ScmSupplierDAO
 * scm_supplier_company_map
 * @author DaiZhichao
 * @version v1.0
 * @since 2018/10/26 17:57
 */
public interface ScmSupplierDAO {

    ScmSupplier findByKey(Integer supplierId);

    ScmSupplierVO findVOByKey(Integer supplierId);

    List<ScmSupplier> listPageByQuery(ScmSupplierQuery query);

    List<ScmSupplierVO> listVOPageByQuery(ScmSupplierQuery query);

    Integer countByQuery(ScmSupplierQuery query);

    Integer countByMax();

    Integer isDuplicate(@Param("name") String name);

    Integer updateByKey(ScmSupplier entity);

    Integer updateStatus(ScmSupplier entity);

    Integer updateStatusBatch(StatusDTO dto);

    Integer updateSort(ScmSupplier entity);

    Integer insert(ScmSupplier entity);

    Integer deleteByKey(Integer supplierId);


}
